//
//  IAMetaDataReader.h
//  VoiceClass
//
//  Created by caoxiaobo on 2018/1/1.
//  Copyright © 2018年 YRX. All rights reserved.
//

#import <Foundation/Foundation.h>

@class IAStudent;
@class IASubjectItem;
@class IASubjectAnswerResult;

typedef void (^IAMetaDataCompletion)(BOOL result);
typedef void (^IAMetaDataReaderCompletion)(id obj);

@interface IAMetaDataReader : NSObject

// 学生列表
+ (NSArray <IAStudent *> *)getStudents;

// 获得课程列表
+ (NSArray <NSString *> *)subjectNames;

// 题目列表读写
+ (void)getSubjectItemsForName:(NSString *)name completion:(IAMetaDataReaderCompletion)completion;
+ (void)saveSubject:(IASubjectItem *)subject completion:(IAMetaDataCompletion)completion;;

// 答题结果读写
+ (void)getAllSubjectResultsWithCompletion:(IAMetaDataReaderCompletion)completion;
+ (void)getSubjectResultsForStudent:(NSString *)studentID completion:(IAMetaDataReaderCompletion)completion;;
+ (void)getSubjectResultsForName:(NSString *)name completion:(IAMetaDataReaderCompletion)completion;;
+ (void)saveSubjectResult:(IASubjectAnswerResult *)result completion:(IAMetaDataCompletion)completion;
+ (NSArray <IASubjectAnswerResult *> *)getSubjectResultsOfQuestion:(NSString *)question;
// 获取文件大小 单位: kb
+ (long long)getAllSubjectResultsBytes;
+ (void)removeAllSubjectResultsBytesWithCompletion:(IAMetaDataCompletion)completion;

@end
